summaryrefslogtreecommitdiff
path: root/dns/enum.py
Commit message (Collapse)AuthorAgeFilesLines
* more lintBob Halley2022-10-021-2/+2
|
* Fix dns.rdatatype special cases.Brian Wellington2022-07-151-2/+17
| | | | | | | | | | | | | | | Prior to this change, there was logic in dns.rdatatype.from_text() and to_text() to deal with types not handled by the RdataType enum; specifically, the NSAP-PTR type (the enum value has a different name, because of the hyphen) and user-registered types. This was fine when internal code called these methods, but most callers of from_text() were converted to dns.rdatatype.RdataType.make(), which supports both integer and text input, and it doesn't handle the special cases. This change adds more hooks into the enum wrapper and moves the special case handling for RdataType into them.
* black autoformattingBob Halley2022-03-151-3/+4
|
* Add no cover for abstract method.Bob Halley2020-07-231-1/+1
|
* Remove dns.rdata{type,class}.to_enum.Brian Wellington2020-05-211-1/+14
| | | | | | | These methods (which convert a str/int into an enum/int) shouldn't be commonly used by external code, so don't need to exist at the module level. The make() method on the enum class (renamed from to_enum()) can still be used, and the internal callers have been updated to use it.
* raise NotImplememtedError, not NotImplementedBob Halley2020-05-201-1/+1
|
* Enum refactoring.Brian Wellington2020-05-191-0/+77
Consolidate the common methods related to enum classes.