Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello there! First time contributing. I've tried to follow the contributing steps but couldn't make tox detect my pyenv config. I manually tested 2.7 and 3.10.
I was playing around with an interactive python and some x509 certificate, but I had to refer to the documentation every time I peeked at the next tag because I never remember the enumeration values.
So this PR makes printing a Tag prints the value from the enums, instead of some obscure integer:
Instead of
Note that in case of a non-universal class, it keeps the
nr
as as integer. If I understood it correctly, non-universal class are for user-defined types, sonr=1
isn't always aNumbers.Boolean
right?I've tried different approach before settling on the one proposed here. Another of my attemps was to try and change the
namedtuple
for acollections.abc.Sequence
to get control on the__init__
and__repr__
. The code turned out too complicated due to the py2-compat.By the way, running the tox tests on the master branch yields some errors.
flake8 complains about the unused
from numbers import Number
import. sphinx complains that the https://tox.wiki/en/latest/install.html url is not found (HTTP 404). sphinx autodoc complains that the docstrings ofasn1.Encoder.construct
is broken.