Zsolt Dollenstein
d9c196b173
Merge branch 'main' into pr1074
2023-12-20 17:41:58 +00:00
Zsolt Dollenstein
465accb0ea
cI: remove rust cache
2023-12-20 17:39:55 +00:00
Zsolt Dollenstein
ce5903f4cb
ci: update rust toolchain GHA ( #1072 )
...
`actions-rs` is unmaintained
2023-12-20 16:58:39 +00:00
David Tolnay
d97fb9be80
Update syn to v2 ( #1064 )
2023-12-20 15:53:54 +00:00
David Tolnay
52bbff6dfc
Set repository metadata entry for Rust crates ( #1063 )
2023-12-12 22:40:40 +00:00
dependabot[bot]
f8a9b80d9e
Bump rustix from 0.38.9 to 0.38.19 in /native ( #1043 )
...
Bumps [rustix](https://github.com/bytecodealliance/rustix ) from 0.38.9 to 0.38.19.
- [Release notes](https://github.com/bytecodealliance/rustix/releases )
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.9...v0.38.19 )
---
updated-dependencies:
- dependency-name: rustix
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 15:07:17 -07:00
dependabot[bot]
9dd3ea7ec7
Bump pypa/cibuildwheel from 2.16.1 to 2.16.2 ( #1041 )
...
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel ) from 2.16.1 to 2.16.2.
- [Release notes](https://github.com/pypa/cibuildwheel/releases )
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md )
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.1...v2.16.2 )
---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 11:14:31 +01:00
Zsolt Dollenstein
693c6dc947
upgrade flake8 ( #1040 )
2023-10-06 10:01:06 -07:00
Itamar Oren
88d0b36cdd
Update pyproject.toml for Python 3.12 support ( #1038 )
...
* Update pyproject.toml for Python 3.12 support
add 3.12 classifier and update description to correctly reflect supported Python versions
* Update pyproject.toml
make the stated parsable versions range consistent with the README
2023-10-05 20:36:12 -07:00
Kyle Into
83f0daed42
fix filepathprovider generic type ( #1036 )
...
* fix filepathprovider type
* remove extra import
2023-10-05 20:18:39 -07:00
Itamar Oren
19c2862ea3
Update README.rst ( #1039 )
...
update Python parseable versions range to include 3.12
2023-10-05 20:18:05 -07:00
Zsolt Dollenstein
8d4229d959
bump version to 1.1.0 ( #1037 )
2023-10-05 19:16:12 -07:00
Sergii Dymchenko
7ca5d7f173
Fix link in type_inference_provider.py ( #1035 )
...
Same change as https://github.com/Instagram/LibCST/pull/913 , but in the docstring.
2023-10-05 15:46:25 -07:00
Zsolt Dollenstein
5df1569a40
Parse multiline expressions in f-strings ( #1027 )
2023-10-02 10:33:29 -07:00
Zsolt Dollenstein
738dc2f893
Upgrade pyre ( #1032 )
...
* Upgrade pyre
* regen fixtures
2023-10-02 09:43:17 -07:00
Zsolt Dollenstein
face393db0
eliminate relative paths from Cargo.toml ( #1031 )
...
* eliminate relative paths from Cargo.toml
* fix paths in LICENSE files
2023-10-02 08:05:33 -07:00
dependabot[bot]
74e8a0e7c0
Bump pypa/cibuildwheel from 2.16.0 to 2.16.1 ( #1029 )
...
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel ) from 2.16.0 to 2.16.1.
- [Release notes](https://github.com/pypa/cibuildwheel/releases )
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md )
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.16.0...v2.16.1 )
---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 08:03:49 -07:00
Zsolt Dollenstein
03179b55eb
Parse arbitrarily nested f-strings ( #1026 )
2023-10-01 20:58:40 +01:00
André C. Silva
552af63d29
ScopeProvider: Record Access for Attributes and Decorators ( #1019 )
...
* Support for Attributes and Decorators in _NameUtil
* Replaced _NameUtil with get_full_name_for_node
* Added tests
2023-10-01 18:34:42 +01:00
dependabot[bot]
e1da64b53e
Bump ufmt from 2.1.0 to 2.2.0 ( #1005 )
...
Bumps [ufmt](https://github.com/omnilib/ufmt ) from 2.1.0 to 2.2.0.
- [Changelog](https://github.com/omnilib/ufmt/blob/main/CHANGELOG.md )
- [Commits](https://github.com/omnilib/ufmt/compare/v2.1.0...v2.2.0 )
---
updated-dependencies:
- dependency-name: ufmt
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-01 14:40:48 +01:00
André C. Silva
f81cc8d00e
AddImportsVisitor: add imports before the first non-import statement ( #1024 )
...
* AddImportsVisitor will now only add at the top of module
- Also added new tests to cover these cases
* Fixed an issue with from imports
* Added a couple tests for AddImportsVisitor
* Refactoring of GatherImportsVisitor
* Refactors, typos and typing changes
2023-10-01 14:38:33 +01:00
Zsolt Dollenstein
46060119a4
Scope provider changes for type annotations ( #1014 )
2023-09-30 11:16:27 +01:00
dependabot[bot]
5346bbfbdd
Bump Swatinem/rust-cache from 2.6.2 to 2.7.0 ( #1020 )
...
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache ) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/swatinem/rust-cache/releases )
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md )
- [Commits](https://github.com/swatinem/rust-cache/compare/v2.6.2...v2.7.0 )
---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 10:20:56 +01:00
dependabot[bot]
a27c4c745c
Bump pypa/cibuildwheel from 2.15.0 to 2.16.0 ( #1025 )
...
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel ) from 2.15.0 to 2.16.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases )
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md )
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.15.0...v2.16.0 )
---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 09:16:01 +01:00
Zsolt Dollenstein
37277e5fe7
add upper bound to pyo3 dependency
2023-09-16 04:02:14 -07:00
Zsolt Dollenstein
9d869b6639
scope_provider: Simplify parent resolution ( #1013 )
...
This PR introduces `Scope._next_visible_parent` which deduplicates much of the logic between `_contains_in_self_or_parent`, `_find_assignment_target_parent`, and `_getitem_from_self_or_parent`.
This will be helpful when implementing scope resolution for the future `AnnotationScope`.
There should be no functionality change.
2023-09-16 03:59:29 -07:00
dependabot[bot]
b509cc8b08
Bump black from 23.7.0 to 23.9.1 ( #1017 )
...
Bumps [black](https://github.com/psf/black ) from 23.7.0 to 23.9.1.
- [Release notes](https://github.com/psf/black/releases )
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md )
- [Commits](https://github.com/psf/black/compare/23.7.0...23.9.1 )
---
updated-dependencies:
- dependency-name: black
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-16 03:37:50 -07:00
dependabot[bot]
f469bcc755
Bump actions/checkout from 3 to 4 ( #1015 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-16 03:36:31 -07:00
Zsolt Dollenstein
94dd20e20e
parser: remove Regexes from whitespace parser ( #1008 )
...
removing Regexes from whitespace parser allows ditching of thread local storage + lazy initialization cost
This shows a modest 2% improvement in overall parse time (inflate is improved by 10%)
2023-09-09 17:03:01 +01:00
Zsolt Dollenstein
377a292d0d
Add crate metadata
2023-09-03 18:16:11 +01:00
Micha Reiser
9c263aa897
Support files with mixed newlines ( #1007 )
...
* Add test case with mixed newlines
* Split lines by any newline character and not just by default
* Add unit test, remove copied
2023-09-02 09:56:20 +01:00
Zsolt Dollenstein
9286446f88
PEP 695 - Type Parameter Syntax ( #1004 )
...
This PR adds support for parsing and representing Type Parameters and Type Aliases as specified by PEP 695. What's missing are the scope rules, to be implemented in a future PR.
Notable (user visible) changes:
- new `TypeAlias` CST node, which is a `SmallStatement`
- new CST nodes to represent TypeVarLikes: `TypeVar`, `TypeVarTuple`, `ParamSpec`
- new helper CST nodes: `TypeParameters` to serve as a container for multiple TypeVarLikes, and `TypeParam` which is a single item in a `TypeParameters` (owning the separating comma)
- extended `FunctionDef` and `ClassDef` with an optional `type_parameters` field, as well as `whitespace_after_type_parameters` to own the extra whitespace between type parameters and the following token
- these new fields are added after all others to avoid breaking callers passing in fields as positional arguments
- in `FunctionDef` and `ClassDef`, `whitespace_after_name` now owns the whitespace before the type parameters if they exist
2023-08-28 22:07:22 +01:00
Zsolt Dollenstein
7c09b5d046
Remove need for regex in TextPosition::matches ( #1002 )
2023-08-27 16:29:20 +01:00
Zsolt Dollenstein
3bb5ba5a86
ci: test with 3.12 ( #1003 )
2023-08-27 16:27:38 +01:00
Zsolt Dollenstein
2064e200af
Fix readme's Python version requirement
2023-08-27 09:31:27 +01:00
Tom Forbes
75b6331d55
Switch to using thread_local regular expressions to avoid regex mutex contention ( #996 )
2023-08-26 15:21:05 +01:00
Tom Forbes
b28777e9e5
Remove criterion-cycles-per-byte dependency and related benchmark measurement ( #995 )
2023-08-26 13:34:27 +01:00
dependabot[bot]
c2d176162f
Bump Swatinem/rust-cache from 2.4.0 to 2.6.2 ( #990 )
...
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache ) from 2.4.0 to 2.6.2.
- [Release notes](https://github.com/swatinem/rust-cache/releases )
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md )
- [Commits](https://github.com/swatinem/rust-cache/compare/v2.4.0...v2.6.2 )
---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-26 13:29:33 +01:00
dependabot[bot]
e9bad94d58
Bump fixit from 0.1.1 to 2.0.0.post1 ( #979 )
...
Bumps [fixit](https://github.com/Instagram/Fixit ) from 0.1.1 to 2.0.0.post1.
- [Changelog](https://github.com/Instagram/Fixit/blob/main/CHANGELOG.md )
- [Commits](https://github.com/Instagram/Fixit/compare/v0.1.1...v2.0.0.post1 )
---
updated-dependencies:
- dependency-name: fixit
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-26 13:07:39 +01:00
dependabot[bot]
6d11068723
Bump black from 23.3.0 to 23.7.0 ( #973 )
...
Bumps [black](https://github.com/psf/black ) from 23.3.0 to 23.7.0.
- [Release notes](https://github.com/psf/black/releases )
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md )
- [Commits](https://github.com/psf/black/compare/23.3.0...23.7.0 )
---
updated-dependencies:
- dependency-name: black
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-26 13:07:12 +01:00
Zsolt Dollenstein
125f9c321b
ci: fix rust-cache config ( #999 )
2023-08-26 13:06:27 +01:00
Zsolt Dollenstein
cbfd9c30a3
drop support for Python 3.7 ( #997 )
2023-08-26 12:42:12 +01:00
Zsolt Dollenstein
43e21c8d71
ci: enable testing on windows + 3.11 ( #998 )
2023-08-26 12:23:13 +01:00
dependabot[bot]
b8a644bc58
Bump pypa/cibuildwheel from 2.13.0 to 2.15.0 ( #987 )
...
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel ) from 2.13.0 to 2.15.0.
- [Release notes](https://github.com/pypa/cibuildwheel/releases )
- [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md )
- [Commits](https://github.com/pypa/cibuildwheel/compare/v2.13.0...v2.15.0 )
---
updated-dependencies:
- dependency-name: pypa/cibuildwheel
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-26 11:56:02 +01:00
Sergii Dymchenko
0f7766f451
Don't gather dirs ending .py ( #994 )
2023-08-26 10:54:32 +01:00
Zsolt Dollenstein
9eab2f037f
Don't insert duplicate imports ( #981 )
2023-07-25 16:13:48 +01:00
Zsolt Dollenstein
0fb9021218
Don't swallow trailing whitespace ( #976 )
2023-07-18 10:03:10 +01:00
Alessandro Pietro Bardelli
a3f5bf97d6
Allow pyo3 >=0.17 ( #957 )
2023-06-14 14:39:03 +01:00
Martin DeMello
50d48c1539
Do not annotate the same variable multiple times in ApplyTypeAnnotationsVisitor ( #956 )
2023-06-14 09:30:56 +01:00
Zsolt Dollenstein
3cacca1a10
Update changelog to 1.0.1
2023-06-07 13:26:02 +01:00