flake8
-
djblets/integrations/manager.py (Diff revision 1) Show all issues
Review Request #12994 — Created April 27, 2023 and submitted
Information | |
---|---|
chipx86 | |
Djblets | |
release-3.x | |
Reviewers | |
djblets | |
This adds type hints for
IntegrationManager
, helping ensure that code
interacting with anIntegrationManager
passes around the right types.
These type hints also cover instance variables, letting IDEs and type
checkers show details on these attributes.
Unit tests, mypy, and pyright pass.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
'typing.Generic' imported but unused Column: 1 Error code: F401 |
![]() |
|
The only thing we're using from weakref is WeakValueDictionary. Can we do a from weakref import WeakValueDictionary to make this … |
|
|
Can we make an alias for Type[Integration]? We use it a lot. |
|
|
undefined name 'Integration' Column: 39 Error code: F821 |
![]() |
|
undefined name 'Integration' Column: 10 Error code: F821 |
![]() |
|
undefined name 'Integration' Column: 44 Error code: F821 |
![]() |
|
undefined name 'Integration' Column: 10 Error code: F821 |
![]() |
Testing Done: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
|||||||||
Diff: |
Revision 2 (+274 -146) |
djblets/integrations/manager.py (Diff revision 2) |
---|
The only thing we're using from
weakref
isWeakValueDictionary
. Can we do afrom weakref import WeakValueDictionary
to make this somewhat less wordy?
djblets/integrations/manager.py (Diff revision 2) |
---|
Can we make an alias for
Type[Integration]
? We use it a lot.
weakref
.IntegrationClassType
type alias.Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+294 -148) |
djblets/integrations/manager.py (Diff revision 3) |
---|
undefined name 'Integration' Column: 39 Error code: F821
djblets/integrations/manager.py (Diff revision 3) |
---|
undefined name 'Integration' Column: 10 Error code: F821
djblets/integrations/manager.py (Diff revision 3) |
---|
undefined name 'Integration' Column: 44 Error code: F821
djblets/integrations/manager.py (Diff revision 3) |
---|
undefined name 'Integration' Column: 10 Error code: F821
Added back the
Integration
typing import.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+296 -148) |