GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add type hints for matplotlib.dates module by bandpooja · Pull Request #30126 · matplotlib/matplotlib Conversation
|
|
Thanks for the review @QuLogic. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Please handle the rest of these. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Done thanks again !! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| fmt: str | ||
|
|
||
| def __init__(self, fmt: str, tz: str | datetime.tzinfo | None = ..., *, usetex: bool | None = ...) -> None: ... | ||
| def __call__(self, x: float, pos: int | None = ...) -> str: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This inherits from Formatter, so can be dropped.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| zero_formats: Sequence[str] | None = ..., | ||
| show_offset: bool = ..., | ||
| *, usetex: bool | None = ...) -> None: ... | ||
| def __call__(self, x: float, pos: int | None = ...) -> str: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| defaultfmt: str = ..., | ||
| *, usetex: bool | None = ...) -> None: ... | ||
| def _set_locator(self, locator: Locator) -> None: ... | ||
| def __call__(self, x: float, pos: int | None = ...) -> str: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| show_offset: bool = ..., | ||
| *, usetex: bool | None = ...) -> None: ... | ||
| def __call__(self, x: float, pos: int | None = ...) -> str: ... | ||
| def format_ticks(self, values: Sequence[float]) -> list[str]: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Also inherited.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| def __call__(self, x: float, pos: int | None = ...) -> str: ... | ||
| def format_ticks(self, values: Sequence[float]) -> list[str]: ... | ||
| def get_offset(self) -> str: ... | ||
| def format_data_short(self, value: float) -> str: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Also inherited.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @staticmethod | ||
| def axisinfo(unit: datetime.tzinfo | None, axis: Axis) -> None: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This isn't a static method, and doesn't return None.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @staticmethod | ||
| def axisinfo(unit: datetime.tzinfo | None, axis: Axis) -> None: ... | ||
| @staticmethod | ||
| def convert(obj: datetime.datetime | datetime.date | float | np.datetime64 | Sequence[datetime.datetime | datetime.date | float | np.datetime64], |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
obj is named value in the source. Also where did float and datetime.date input come from? This goes through date2num which takes datetime.datetime | np.datetime64.
And probably this should be overloaded like date2num.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @staticmethod | ||
| def axisinfo(unit: datetime.tzinfo | None, axis: Axis) -> None: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same as above, isn't static and doesn't return None.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| class _SwitchableDateConverter: | ||
| @staticmethod | ||
| def _get_converter() -> "ConciseDateConverter" | "DateConverter": ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Note sure why these are quoted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @staticmethod | ||
| def axisinfo(unit: datetime.tzinfo | None, axis: Axis) -> AxisInfo: ... | ||
| @staticmethod | ||
| def default_units(x: datetime.datetime | datetime.date | float | np.ndarray | Sequence[datetime.datetime | datetime.date | float | np.datetime64], | ||
| axis: Axis) -> datetime.tzinfo | None: ... | ||
| @staticmethod | ||
| def convert(value: datetime.datetime | datetime.date | float | np.datetime64 | Sequence[datetime.datetime | datetime.date | float | np.datetime64], | ||
| unit: datetime.tzinfo | None, axis: Axis) -> float | np.ndarray: ... |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
None of these are static.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
👋 @bandpooja I accidentally started work on this too at #30385 - are you still interested in finishing off this pull request? If you are, please let us know if you have any questions or can help at all. If not, it would be good to know and we can finish off the work you started :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I removed this from 3.11 and marked as draft because it has been quiet. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Missing type hints formatplotlib.dates.DateFormatter
There was an error while loading. Please reload this page.