-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Make scripts-dev
pass mypy --disallow-untyped-defs
#12356
Commits on Apr 20, 2022
-
Typecheck build_debian_packages
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for 3833322 - Browse repository at this point
Copy the full SHA 3833322View commit details -
Typecheck federation_client.py
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for 9310352 - Browse repository at this point
Copy the full SHA 9310352View commit details -
David Robertson committed
Apr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for d955162 - Browse repository at this point
Copy the full SHA d955162View commit details -
Easy type fixes for the release script
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for 79a5ab9 - Browse repository at this point
Copy the full SHA 79a5ab9View commit details -
Workaround a false positive about indexing into refs
``` scripts-dev/release.py:495: error: Unsupported right operand type for in ("Callable[[], IterableList[Reference]]") [operator] scripts-dev/release.py:496: error: Value of type "Callable[[], IterableList[Reference]]" is not indexable [index] ``` `refs` is an alias the the property `references`. Mypy gets confused by the alias, see python/mypy#6700
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for 42c7b52 - Browse repository at this point
Copy the full SHA 42c7b52View commit details -
Get tracking branch to avoid a second None check
Mypy can't see that `tracking_branch()` returning truthy means that the second call to `tracking_branch` returns a non-`None` value. A use for the walrus operator?
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for c25e51d - Browse repository at this point
Copy the full SHA c25e51dView commit details -
Assert away a complaint about LegacyVersion
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for 4cb3e76 - Browse repository at this point
Copy the full SHA 4cb3e76View commit details -
Fix a complaint that
click.edit
can return NoneDavid Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for b2fe52a - Browse repository at this point
Copy the full SHA b2fe52aView commit details -
Fix complaint about writing a different type to release_branch
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for 41618ef - Browse repository at this point
Copy the full SHA 41618efView commit details -
Use
set_reference
over a write to.reference
`.reference` is a property whose setter function is `set_reference`. My isn't happy when we try to assign directly: ``` scripts-dev/release.py:208: error: Trying to assign name "reference" that is not in "__slots__" of type "git.refs.head.HEAD" [misc] scripts-dev/release.py:208: error: Incompatible types in assignment (expression has type "HEAD", variable has type "Union[Head, TagReference, RemoteReference, Reference]") [assignment] ``` but calling `set_reference` ourselves makes the typechecker happy. Confusingly the following three types are all different: - the `refererence` property: `Union['Head', 'TagReference', 'RemoteReference', 'Reference']` - return type of `_get_reference`: `SymbolicReference` - `set_reference` first argument: `Union[Commit_ish, 'SymbolicReference', str]` where `Commit_ish = Union['Commit', 'TagObject', 'Blob', 'Tree']` It seems that typecheckers haven't settled down on The Way to handle properties whose getter and setter types differ: see e.g. python/mypy#3004 .
David Robertson committedApr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for dba3efc - Browse repository at this point
Copy the full SHA dba3efcView commit details -
David Robertson committed
Apr 20, 2022 Configuration menu - View commit details
-
Copy full SHA for 6b20e2d - Browse repository at this point
Copy the full SHA 6b20e2dView commit details
Commits on Apr 27, 2022
-
Comment to clarify the click.edit assertion
David Robertson committedApr 27, 2022 Configuration menu - View commit details
-
Copy full SHA for 9901aac - Browse repository at this point
Copy the full SHA 9901aacView commit details -
Merge remote-tracking branch 'origin/develop' into dmr/typing-scripts…
…-dev This includes the changes to the release script to make it work post-poetry.
David Robertson committedApr 27, 2022 Configuration menu - View commit details
-
Copy full SHA for 15dc9e2 - Browse repository at this point
Copy the full SHA 15dc9e2View commit details -
Need a cast to safely narrow a union
David Robertson committedApr 27, 2022 Configuration menu - View commit details
-
Copy full SHA for 36c86a4 - Browse repository at this point
Copy the full SHA 36c86a4View commit details