We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2e4081 commit 09acae1Copy full SHA for 09acae1
pint/facets/plain/registry.py
@@ -366,11 +366,11 @@ def __getattr__(self, item: str) -> QuantityT:
366
# self.Unit will call parse_units
367
return self.Unit(item)
368
369
+ @deprecated(
370
+ "Calling the getitem method from a UnitRegistry will be removed in future versions of pint.\n"
371
+ "use `parse_expression` method or use the registry as a callable."
372
+ )
373
def __getitem__(self, item: str) -> UnitT:
- logger.warning(
- "Calling the getitem method from a UnitRegistry is deprecated. "
- "use `parse_expression` method or use the registry as a callable."
- )
374
return self.parse_expression(item)
375
376
def __contains__(self, item: str) -> bool:
0 commit comments