dave-shawley/ietfparse

View on GitHub
Merge pull request #34 from dave-shawley/rm-deprecated #170
dave-shawley authored 52724f3e
complete00:00:17
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.yml.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
docker pull codeclimate/codeclimate-pep8:b25
b25: Pulling from codeclimate/codeclimate-pep8
ab6db1bc80d0: Pulling fs layer
bf17e9a1c113: Pulling fs layer
4f8d95c214b1: Pulling fs layer
0de813e89c33: Pulling fs layer
a9696c7f4cd8: Pulling fs layer
51b9219e6e44: Pulling fs layer
e3c7e34cb08c: Pulling fs layer
328f3a57c882: Pulling fs layer
43b5f16a0c84: Pulling fs layer
a9696c7f4cd8: Waiting
51b9219e6e44: Waiting
e3c7e34cb08c: Waiting
328f3a57c882: Waiting
43b5f16a0c84: Waiting
0de813e89c33: Waiting
bf17e9a1c113: Verifying Checksum
bf17e9a1c113: Download complete
4f8d95c214b1: Verifying Checksum
4f8d95c214b1: Download complete
ab6db1bc80d0: Verifying Checksum
ab6db1bc80d0: Download complete
a9696c7f4cd8: Verifying Checksum
a9696c7f4cd8: Download complete
ab6db1bc80d0: Pull complete
51b9219e6e44: Download complete
bf17e9a1c113: Pull complete
e3c7e34cb08c: Download complete
0de813e89c33: Verifying Checksum
0de813e89c33: Download complete
4f8d95c214b1: Pull complete
328f3a57c882: Download complete
43b5f16a0c84: Download complete
0de813e89c33: Pull complete
a9696c7f4cd8: Pull complete
51b9219e6e44: Pull complete
e3c7e34cb08c: Pull complete
328f3a57c882: Pull complete
43b5f16a0c84: Pull complete
Digest: sha256:75f70c714bc5f9e65359d45469a1fe7c1b181a15aee8fbabec7e23c65b19d447
Status: Downloaded newer image for registry.prod.codeclimate.net/codeclimate/codeclimate-pep8:b25
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-04-08T04:01:10.105815 #1]  INFO -- : Skipping file ./ietfparse/errors.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 37
    def __init__(self, header_name: str, header_value: str) -> None:
                                  ^
SyntaxError: invalid syntax


I, [2024-04-08T04:01:10.109026 #1]  INFO -- : Skipping file ./ietfparse/algorithms.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 19
    def _content_type_matches(candidate: datastructures.ContentType,
                                       ^
SyntaxError: invalid syntax


I, [2024-04-08T04:01:10.117742 #1]  INFO -- : Skipping file ./ietfparse/_helpers.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 39
    def __init__(self, strict: bool = True) -> None:
                             ^
SyntaxError: invalid syntax


I, [2024-04-08T04:01:10.121176 #1]  INFO -- : Skipping file ./ietfparse/headers.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 32
    def parse_accept(header_value: str,
                                 ^
SyntaxError: invalid syntax


I, [2024-04-08T04:01:10.129889 #1]  INFO -- : Skipping file ./ietfparse/__init__.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 4
    version_info: list[str | int] = [int(c) for c in version.split('.')[:3]]
                ^
SyntaxError: invalid syntax


I, [2024-04-08T04:01:10.133213 #1]  INFO -- : Skipping file ./ietfparse/datastructures.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 49
    content_type: str
                ^
SyntaxError: invalid syntax
7
pep8
pep8 engine documentation
View output
tests/ docs/ .circleci/ ietfparse/
8
radon
radon engine documentation
View output
Running radon3...
9
sonar-python
sonar-python engine documentation
View output
INFO: Java 1.8.0_111-internal Oracle Corporation (64-bit)
INFO: Linux 4.4.0-1128-aws amd64
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-core-2.17.0.899.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/src/app/build/libs/sonarlint-cli-2.1.0.566.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
INFO: Index files
INFO: 34 files indexed
ERROR: Unable to parse file: /code/ietfparse/_helpers.py
ERROR: Parse error at line 41 column 20:

    6: 
    7:     """
    8:     Utility class to parse Link headers.
    9: 
   10:     :param strict: controls whether parsing follows all of
   11:         the rules laid out in :rfc:`5988`
   12: 
   13:     This class parses the parameters for a single :mailheader:`Link`
   14:     value.  It is used from within the guts of
   15:     :function:`ietfparse.headers.parse_link_header` and not readily
   16:     suited for other uses.  If *strict mode* is enabled, then the
   17:     following rules from the RFC are obeyed:
   18: 
   19:     - section 5.3: when multiple "rel" attributes are present, then
   20:       the first one is chosen.  The remaining are omitted from the
   21:       value set.
   22:     - section 5.4: "there MUST NOT be more than one media parameter".
   23:       If more than one is present, then ``MalformedLinkValue`` is
   24:       raised.
   25:     - section 5.4: when multiple "type" attributes are present, then
   26:       the first one is chosen.  The remaining are omitted form the
   27:       value set.
   28:     - section 5.4: when multiple "title" attributes are present, then
   29:       the first one is chosen.  The remaining are omitted form the
   30:       value set.
   31:     - section 5.4: if both "title" and "title*" are present, then
   32:       "title*" is preferred.  The value of "title*" will be used
   33:       in all cases.
   34:     - section 5.4: "there MUST NOT be more than one type parameter".
   35:       If more than one is present, then ``MalformedLinkValue`` is
   36:       raised.
   37: 
   38:     """
   39:     def __init__(self, strict: bool = True) -> None:
   40:         self.strict = strict
  -->          self._values: list[tuple[str, str]] = []
   42:         self._rfc_values: dict[str, str | None] = {
   43:             'rel':

ERROR: Unable to parse file: /code/ietfparse/headers.py
ERROR: Parse error at line 191 column 14:

  173: )
  174: 
  175: 
  176: def parse_cache_control(
  177:         header_value: str) -> dict[str, str | int | bool | None]:
  178:     """
  179:     Parse a `Cache-Control`_ header, returning a dictionary of key-value pairs.
  180: 
  181:     Any of the ``Cache-Control`` parameters that do not have directives, such
  182:     as ``public`` or ``no-cache`` will be returned with a value of ``True``
  183:     if they are set in the header.
  184: 
  185:     :param header_value: ``Cache-Control`` header value to parse
  186:     :return: the parsed ``Cache-Control`` header values
  187: 
  188:     .. _Cache-Control: https://tools.ietf.org/html/rfc7234#section-5.2
  189: 
  190:     """
  -->      directives: dict[str, str | int | bool | None] = {}
  192: 
  193:     for segment in parse_list(header_value):
  194:         name, sep

ERROR: Unable to parse file: /code/ietfparse/__init__.py
ERROR: Parse error at line 4 column 12:

    1: from __future__ import annotations
    2: 
    3: version = '2.0.0.dev1'
  -->  version_info: list[str | int] = [int(c) for c in version.split('.')[:3]]
    5: version_info +=

ERROR: Unable to parse file: /code/ietfparse/datastructures.py
ERROR: Parse error at line 49 column 16:

   12: 
   13: from __future__ import annotations
   14: 
   15: import functools
   16: from collections import abc
   17: 
   18: 
   19: @functools.total_ordering
   20: class ContentType(object):
   21:     """A MIME ``Content-Type`` header.
   22: 
   23:     :param content_type: the primary content type
   24:     :param content_subtype: the content sub-type
   25:     :param content_suffix: optional content suffix
   26:     :param parameters: optional dictionary of content type
   27:         parameters
   28: 
   29:     Internet content types are described by the :mailheader:`Content-Type`
   30:     header from :rfc:`2045`.  It was reused across many other protocol
   31:     specifications, most notably HTTP (:rfc:`7231`).  This header's
   32:     syntax is described in :rfc:`2045#section-5.1`.  In its most basic
   33:     form, a content type header looks like ``text/html``.  The primary
   34:     content type is ``text`` with a *subtype* of ``html``.  Content type
   35:     headers can include *parameters* as ``name=value`` pairs separated
   36:     by colons.
   37: 
   38:     :rfc:`6839` added the ability to use a content type to identify the
   39:     semantic value of a representation with a content type and also identify
   40:     the document format as a content type suffix.  For example,
   41:     ``application/vnd.github.v3+json`` is used to identify documents that
   42:     match version 3 of the GitHub API that are represented as JSON documents.
   43:     The same entity encoded as msgpack would have the content type
   44:     ``application/vnd.github.v3+msgpack``.  In this case, the content type
   45:     identifies the information that is in the document and the suffix is used
   46:     to identify the content format.
   47: 
   48:     """
  -->      content_type: str
   50:     content_subtype: str
   51:     parameters: abc.MutableMapping[str, str]
   52:     content_suffix: str | None
   53:     quality: float | None
   54: 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 0.511s
INFO: Final Memory: 6M/295M
INFO: ------------------------------------------------------------------------