rayference / pinttrs Goto Github PK
View Code? Open in Web Editor NEWPint meets attrs
Home Page: https://pinttrs.readthedocs.io
License: MIT License
Pint meets attrs
Home Page: https://pinttrs.readthedocs.io
License: MIT License
The signature of units_compatible()
says that its arguments must be of type pint.Unit
, however the following code:
import pint
from pinttr.util import units_compatible
units_compatible(pint.Unit("m"), pint.Unit("km"))
raises
AttributeError: 'Unit' object has no attribute '_get_non_multiplicative_units'
whereas:
ureg = pint.UnitRegistry()
units_compatible(ureg("m"), ureg("km"))
works fine, which suggests that the arguments type of units_compatible()
is pint.Quantity
, instead of pint.Unit
?
Using sphobjinv, it turns out that Pinttrs docs do not export any symbols:
$ sphobjinv convert plain objects.inv
$ cat objects.txt
# Sphinx inventory version 2
# Project: Pinttrs
# Version: 21.3
# The remainder of this file is compressed using zlib.
api std:label -1 rst/api.html#$ API Reference
api-converters std:label -1 rst/api.html#$ Converters [pinttr.converters]
api-dict_interpretation std:label -1 rst/api.html#api-dict-interpretation Dictionary interpretation
api-dynamic std:label -1 rst/api.html#$ Dynamic unit management
api-exceptions std:label -1 rst/api.html#$ Exceptions [pinttr.exceptions]
api-main std:label -1 rst/api.html#$ Main interface
api-unit_registry std:label -1 rst/api.html#api-unit-registry Default unit registry
api-utilities std:label -1 rst/api.html#$ Utilities [pinttr.util]
api-validators std:label -1 rst/api.html#$ Validators [pinttr.validators]
compatible std:label -1 rst/compatible.html#$ What are “compatible units”?
dev std:label -1 rst/dev.html#$ Developer guide
genindex std:label -1 genindex.html Index
index std:doc -1 index.html Pinttrs
modindex std:label -1 py-modindex.html Module Index
py-modindex std:label -1 py-modindex.html Python Module Index
rst/api std:doc -1 rst/api.html API Reference
rst/changes std:doc -1 rst/changes.html Changelog
rst/compatible std:doc -1 rst/compatible.html What are “compatible units”?
rst/dev std:doc -1 rst/dev.html Developer guide
rst/usage std:doc -1 rst/usage.html Usage
search std:label -1 search.html Search Page
usage std:label -1 rst/usage.html#$ Usage
usage-attach_units std:label -1 rst/usage.html#usage-attach-units Attaching units to attributes
usage-attach_units-validators_converters std:label -1 rst/usage.html#usage-attach-units-validators-converters Validators and converters
usage-interpret_dicts std:label -1 rst/usage.html#usage-interpret-dicts Interpreting units in dicts
usage-unit_contexts std:label -1 rst/usage.html#usage-unit-contexts Unit contexts
This doesn't allow for linking from external projects.
After a quick investigation, it turns out that fresher iterations of the package generate correct inventory files. Check again after the next release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.