Skip to content

Use property decorator to improve typing compatibility#1925

Merged
s-t-e-v-e-n-k merged 1 commit intoPyGithub:masterfrom
nakato:property
Apr 26, 2021
Merged

Use property decorator to improve typing compatibility#1925
s-t-e-v-e-n-k merged 1 commit intoPyGithub:masterfrom
nakato:property

Conversation

@nakato
Copy link
Copy Markdown
Contributor

@nakato nakato commented Apr 21, 2021

As a property these functions are expected to be accessed without the
private _get and _set functions, however while the functions are
typed, the property is not, and mypy shows an attribute error.

As this codebase no-longer requires support for python versions without
support for @property.setter(2.6?) this updates the functions to use
decorators and updates the type files to reflect the attribute
existence.

As a property these functions are expected to be accessed without the
private __get_ and __set_ functions, however while the functions are
typed, the property is not, and mypy shows an attribute error.

As this codebase no-longer requires support for python versions without
support for @property.setter(2.6?) this updates the functions to use
decorators and updates the type files to reflect the attribute
existence.
@s-t-e-v-e-n-k s-t-e-v-e-n-k merged commit e416810 into PyGithub:master Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants