Closed salty-horse closed 1 month ago
tox
make test
tox -e lint
make lint
master
Arrow's __getattr__ provides access to datetime attributes that aren't handled by Arrow. It has this signature:
__getattr__
datetime
def __getattr__(self, name: str) -> int
It should return Any, as not all attributes from datetime are ints.
Any
int
For example, in arrow.now().tzname(), tzname is a function.
arrow.now().tzname()
tzname
I noticed that __getattr__ implements two undocumented attributes: week and quarter. The should be split into their own methods, with a docstring.
week
quarter
Pull Request Checklist
tox
ormake test
to find out!).tox -e lint
ormake lint
to find out!).master
branch.Description of Changes
Arrow's
__getattr__
provides access todatetime
attributes that aren't handled by Arrow. It has this signature:It should return
Any
, as not all attributes fromdatetime
areint
s.For example, in
arrow.now().tzname()
,tzname
is a function.I noticed that
__getattr__
implements two undocumented attributes:week
andquarter
. The should be split into their own methods, with a docstring.