pendulum icon indicating copy to clipboard operation
pendulum copied to clipboard

Method `pendulum.tz.timezone` shadows module `pendulum.tz.timezone`

Open labrys opened this issue 7 years ago • 2 comments

This causes issues with type-hinting when trying to add pendulum.tz.timezone.Timezone type-hints.

labrys avatar Jun 20 '18 23:06 labrys

This is a problem. This also prevents isinstance(x, pendulum.tz.timezone.Timezone) from working as desired.

Luckily it seems it is being addressed. In 3.0.0b1, the above works.

At least in later versions of v2

pendulum.tz._Timezone
pendulum.tz._FixedTimezone

can be used. However, the base class, PendulumTimezone is not available.

computercolin avatar Dec 16 '23 09:12 computercolin

What is the fix for this?

tyteen4a03 avatar Jul 13 '24 21:07 tyteen4a03