Conversation
c2c654a to
677d368
Compare
|
@staticdev since I saw you merge my previous PR, I raised this just in case you wanted some more dependency updates since it was just a matter of cherry-picking from my fork |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2334 +/- ##
=======================================
Coverage 99.12% 99.12%
=======================================
Files 40 40
Lines 3098 3098
Branches 788 788
=======================================
Hits 3071 3071
Misses 15 15
Partials 12 12 |
|
|
||
| except ImportError: | ||
| parse_requirements = None | ||
| parse_requirements = None # type: ignore[assignment] |
There was a problem hiding this comment.
This can be fixed by initialising parse_requirements on line 27 as parse_requirements: types.ModelType | None right? Or does mypy no longer support that pattern?
There was a problem hiding this comment.
This can be fixed by initialising
parse_requirementson line 27 asparse_requirements: types.ModelType | Noneright? Or doesmypyno longer support that pattern?
Sorry, what is types.ModelType?
I think the typing would have to be something like (from a glance at https://github.com/di/pip-api/blob/21eea42e37b29e18c004a922f8989108a006a203/pip_api/_parse_requirements.py#L484):
parse_requirements: (
Callable[
[os.PathLike[str], Optional[Any], bool, bool],
Dict[str, Union[pip_api.Requirement, pip_api.UnparsedRequirement]],
]
| None
)but that's a bit tricky, because at this point pip_api isn't imported, so pip_api.UnparsedRequirement is unknown
There was a problem hiding this comment.
Ah my bad, didn't read this correctly.
Indeed seems like fixing this is more trouble than it is worth
| hypothesmith = ">=0.1.3" | ||
| hypothesis = ">=6.10.1" | ||
| mypy = ">=0.902,<1.0.0" | ||
| mypy = ">=0.902,<2.0.0" |
There was a problem hiding this comment.
Why limit this to below 2?
The original commit was from dependabot (matthewhughes934/isort-fork@390f27e) and that's how it handled it, happy to drop the restriction
There was a problem hiding this comment.
I would probably remove it, but @staticdev might have a different opinion
| hypothesmith = ">=0.1.3" | ||
| hypothesis = ">=6.10.1" | ||
| mypy = ">=0.902,<1.0.0" | ||
| mypy = ">=0.902,<2.0.0" |
There was a problem hiding this comment.
I would suggest to change to:
| mypy = ">=0.902,<2.0.0" | |
| mypy = ">=1.14.1" |
There was a problem hiding this comment.
I would suggest to change to:
updated while rebasing on main: 01afb2e
| example-shared-isort-profile = ">=0.1.0" | ||
| flake8 = ">=3.8.4" | ||
| flake8-bugbear = ">=22.12.6,<23.0.0" | ||
| flake8-bugbear = ">=22.12.6,<25.0.0" |
There was a problem hiding this comment.
Here I would do:
| flake8-bugbear = ">=22.12.6,<25.0.0" | |
| flake8-bugbear = ">=24.12.12" |
There was a problem hiding this comment.
Here I would do:
squashed in with my rebase: a8dbecf
677d368 to
a8dbecf
Compare
DanielNoord
left a comment
There was a problem hiding this comment.
LGTM!
@staticdev I think we can merge this already, it doesn't break main more than it already is
a8dbecf to
e316b9b
Compare
staticdev
left a comment
There was a problem hiding this comment.
@matthewhughes934 still we have to figure out what is the issue now with Python 3.13, since tests still are not passing.
👍 I will have a deeper look later today |
544d4db to
4f38a97
Compare
the failure was a built time, I've fixed it up and rebased, see commit faf22ce for details (the last bit of the body) |
|
Sorry @matthewhughes934 due to a merge of new Poetry this lock got obsolete. Could you please rebase and lock again? |
This includes removing some now unused ignores, and fixing some new
errors:
isort/sorting.py:120: error: Unused "type: ignore" comment [unused-ignore]
isort/settings.py:869: error: Unused "type: ignore" comment [unused-ignore]
isort/literal.py:89: error: Unused "type: ignore" comment [unused-ignore]
isort/deprecated/finders.py:32: error: Incompatible types in assignment (expression has type "None", variable has type "Callable[[PathLike[Any], Optional[Any], bool, bool], Dict[str, Union[Requirement, UnparsedRequirement]]]") [assignment]
isort/api.py:196: error: No overload variant of "compile" matches argument types "str", "str", "str", "int", "int" [call-overload]
isort/api.py:196: note: Possible overload variants:
isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[0], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> CodeType
isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, *, dont_inherit: bool = ..., optimize: int = ..., _feature_version: int = ...) -> CodeType
isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[1024], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> AST
isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: int, dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> Any
isort/api.py:223: error: No overload variant of "compile" matches argument types "str", "str", "str", "int", "int" [call-overload]
isort/api.py:223: note: Possible overload variants:
isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[0], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> CodeType
isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, *, dont_inherit: bool = ..., optimize: int = ..., _feature_version: int = ...) -> CodeType
isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[1024], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> AST
isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: int, dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> Any
tests/integration/test_setting_combinations.py:64: error: Unused "type: ignore" comment [unused-ignore]
tests/unit/test_isort.py:5550: error: Signature of "seek" incompatible with supertype "TextIOWrapper" [override]
tests/unit/test_isort.py:5550: note: Superclass:
tests/unit/test_isort.py:5550: note: def seek(self, int, int = ..., /) -> int
tests/unit/test_isort.py:5550: note: Subclass:
tests/unit/test_isort.py:5550: note: def seek(self, position: Any) -> Any
tests/unit/test_isort.py:5550: error: Signature of "seek" incompatible with supertype "IOBase" [override]
tests/unit/test_isort.py:5550: note: Superclass:
tests/unit/test_isort.py:5550: note: def seek(self, int, int = ..., /) -> int
tests/unit/test_isort.py:5550: note: Subclass:
tests/unit/test_isort.py:5550: note: def seek(self, position: Any) -> Any
tests/unit/test_isort.py:5550: error: Signature of "seek" incompatible with supertype "IO" [override]
tests/unit/test_isort.py:5550: note: Superclass:
tests/unit/test_isort.py:5550: note: def seek(self, int, int = ..., /) -> int
tests/unit/test_isort.py:5550: note: Subclass:
tests/unit/test_isort.py:5550: note: def seek(self, position: Any) -> Any
tests/integration/test_hypothesmith.py:69: error: Unused "type: ignore" comment [unused-ignore]
Found 11 errors in 8 files (checked 88 source files)
And fix some issues from new `bugbear`:
tests/unit/test_setuptools_command.py:15:5: B036 Don't except `BaseException` unless you plan to re-raise it.
tests/unit/test_setuptools_command.py:30:5: B036 Don't except `BaseException` unless you plan to re-raise it.
4f38a97 to
0eaafa0
Compare
👍 looks like that change brought in all the updates from my first commit, so that's gone away with the rebase |
|
LGTM, thanks @matthewhughes934 @DanielNoord |
Final round of updates from my fork. After this I think all dependencies
should be close to their latest release, in my fork I added
dependabotafter these changes to keep things up to date.
Context, other PRs were from 26cf27d,
78c30dc and comment
#2320 (comment)
Update
mypytov1+This includes removing some now unused ignores, and fixing some new
errors:
Update
bugbearAnd fix some issues from new
bugbear: