summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2015-11-15 13:16:15 +0000
committerelie <elie>2015-11-15 13:16:15 +0000
commitdf91c279bac7d3444b285b379fab0df3b1b60b20 (patch)
tree93f6493dd5096ce18ec791f1a8a996a122872e42
parentfa33edb95de2e8ecaad982e8e5f76d91e3ed73b1 (diff)
downloadpyasn1-df91c279bac7d3444b285b379fab0df3b1b60b20.tar.gz
fixes to comments
-rw-r--r--pyasn1/codec/ber/decoder.py1
-rw-r--r--pyasn1/codec/ber/encoder.py1
-rw-r--r--pyasn1/codec/cer/decoder.py1
-rw-r--r--pyasn1/codec/cer/encoder.py1
-rw-r--r--pyasn1/codec/der/decoder.py1
-rw-r--r--pyasn1/codec/der/encoder.py1
-rw-r--r--pyasn1/type/base.py1
-rw-r--r--pyasn1/type/char.py1
-rw-r--r--pyasn1/type/constraint.py13
-rw-r--r--pyasn1/type/namedtype.py4
-rw-r--r--pyasn1/type/tag.py3
-rw-r--r--pyasn1/type/univ.py2
-rw-r--r--pyasn1/type/useful.py2
13 files changed, 5 insertions, 27 deletions
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py
index 81812cb..530f4db 100644
--- a/pyasn1/codec/ber/decoder.py
+++ b/pyasn1/codec/ber/decoder.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# BER decoder
from pyasn1.type import tag, univ, char, useful, tagmap
from pyasn1.codec.ber import eoo
from pyasn1.compat.octets import oct2int, isOctetsType
diff --git a/pyasn1/codec/ber/encoder.py b/pyasn1/codec/ber/encoder.py
index c46d254..f403530 100644
--- a/pyasn1/codec/ber/encoder.py
+++ b/pyasn1/codec/ber/encoder.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# BER encoder
from pyasn1.type import base, tag, univ, char, useful
from pyasn1.codec.ber import eoo
from pyasn1.compat.octets import int2oct, oct2int, ints2octs, null, str2octs
diff --git a/pyasn1/codec/cer/decoder.py b/pyasn1/codec/cer/decoder.py
index ce88263..281e903 100644
--- a/pyasn1/codec/cer/decoder.py
+++ b/pyasn1/codec/cer/decoder.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# CER decoder
from pyasn1.type import univ
from pyasn1.codec.ber import decoder
from pyasn1.compat.octets import oct2int
diff --git a/pyasn1/codec/cer/encoder.py b/pyasn1/codec/cer/encoder.py
index 34ad6e4..8a7180a 100644
--- a/pyasn1/codec/cer/encoder.py
+++ b/pyasn1/codec/cer/encoder.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# CER encoder
from pyasn1.type import univ
from pyasn1.type import useful
from pyasn1.codec.ber import encoder
diff --git a/pyasn1/codec/der/decoder.py b/pyasn1/codec/der/decoder.py
index f491df6..d4354f7 100644
--- a/pyasn1/codec/der/decoder.py
+++ b/pyasn1/codec/der/decoder.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# DER decoder
from pyasn1.codec.cer import decoder
tagMap = decoder.tagMap
diff --git a/pyasn1/codec/der/encoder.py b/pyasn1/codec/der/encoder.py
index 052e2bd..635ecab 100644
--- a/pyasn1/codec/der/encoder.py
+++ b/pyasn1/codec/der/encoder.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# DER encoder
from pyasn1.type import univ
from pyasn1.codec.cer import encoder
from pyasn1 import error
diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py
index c5c18ec..9f090c8 100644
--- a/pyasn1/type/base.py
+++ b/pyasn1/type/base.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# Base classes for ASN.1 types
import sys
from pyasn1.type import constraint, tagmap, tag
from pyasn1 import error
diff --git a/pyasn1/type/char.py b/pyasn1/type/char.py
index 46b3eac..6dc0e82 100644
--- a/pyasn1/type/char.py
+++ b/pyasn1/type/char.py
@@ -4,7 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# ASN.1 "character string" types
from pyasn1.type import univ, tag
class NumericString(univ.OctetString):
diff --git a/pyasn1/type/constraint.py b/pyasn1/type/constraint.py
index 8e468fd..8895a33 100644
--- a/pyasn1/type/constraint.py
+++ b/pyasn1/type/constraint.py
@@ -4,16 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# ASN.1 subtype constraints classes.
-#
-# Constraints are relatively rare, but every ASN1 object
-# is doing checks all the time for whether they have any
-# constraints and whether they are applicable to the object.
-#
-# What we're going to do is define objects/functions that
-# can be called unconditionally if they are present, and that
-# are simply not present if there are no constraints.
-#
# Original concept and code by Mike C. Fletcher.
#
import sys
@@ -23,7 +13,8 @@ class AbstractConstraint:
"""Abstract base-class for constraint objects
Constraints should be stored in a simple sequence in the
- namespace of their client Asn1Item sub-classes.
+ namespace of their client Asn1Item sub-classes in cases
+ when ASN.1 constraint is define.
"""
def __init__(self, *values):
self._valueMap = {}
diff --git a/pyasn1/type/namedtype.py b/pyasn1/type/namedtype.py
index 25a33bf..077ca2b 100644
--- a/pyasn1/type/namedtype.py
+++ b/pyasn1/type/namedtype.py
@@ -4,13 +4,13 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# NamedType specification for constructed types
-#
import sys
from pyasn1.type import tagmap
from pyasn1 import error
class NamedType:
+ """Named type specification for constructed types
+ """
isOptional = 0
isDefaulted = 0
def __init__(self, name, t):
diff --git a/pyasn1/type/tag.py b/pyasn1/type/tag.py
index cf4cf95..f040c1b 100644
--- a/pyasn1/type/tag.py
+++ b/pyasn1/type/tag.py
@@ -4,8 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# ASN.1 types tags
-#
from operator import getitem
from pyasn1 import error
@@ -22,6 +20,7 @@ tagCategoryExplicit = 0x02
tagCategoryUntagged = 0x04
class Tag:
+ """ASN.1 types tags"""
def __init__(self, tagClass, tagFormat, tagId):
if tagId < 0:
raise error.PyAsn1Error(
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index 7beb4b2..4e79483 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -4,8 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# ASN.1 "universal" data types
-#
import operator, sys, math
from pyasn1.type import base, tag, constraint, namedtype, namedval, tagmap
from pyasn1.codec.ber import eoo
diff --git a/pyasn1/type/useful.py b/pyasn1/type/useful.py
index 3a77157..a131d7e 100644
--- a/pyasn1/type/useful.py
+++ b/pyasn1/type/useful.py
@@ -4,8 +4,6 @@
# Copyright (c) 2005-2015, Ilya Etingof <ilya@glas.net>
# License: http://pyasn1.sf.net/license.html
#
-# ASN.1 "useful" types
-#
from pyasn1.type import char, tag
class ObjectDescriptor(char.GraphicString):