Git Product home page Git Product logo

adopt-ruff's People

Contributors

scdor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

adopt-ruff's Issues

Encoding issue

(311) D:\forks\HACE\autocook>adopt-ruff --code-path autocook --ruff-conf-path pyproject.toml
C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\pydantic\_internal\_config.py:272: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.6/migration/
  warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)
2024-02-22 09:35:12.526 | DEBUG    | adopt_ruff.main:_main:316 - code_path.resolve()=D:\forks\HACE\autocook\autocook
2024-02-22 09:35:12.528 | DEBUG    | adopt_ruff.main:_main:317 - ruff_conf_path=pyproject.toml
2024-02-22 09:35:12.530 | DEBUG    | adopt_ruff.main:_main:318 - include_preview=True
2024-02-22 09:35:12.538 | DEBUG    | adopt_ruff.main:_main:319 - include_sometimes_fixable=False
2024-02-22 09:35:12.540 | DEBUG    | adopt_ruff.main:_main:320 - repo_name=None
2024-02-22 09:35:12.558 | DEBUG    | adopt_ruff.main:run_ruff:31 - parsed ruff_version=0.1.14
Exception in thread Thread-3 (_readerthread):
Traceback (most recent call last):
  File "C:\Users\bach_ar\.conda\envs\311\Lib\threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "C:\Users\bach_ar\.conda\envs\311\Lib\threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\bach_ar\.conda\envs\311\Lib\subprocess.py", line 1597, in _readerthread
    buffer.append(fh.read())
                  ^^^^^^^^^
  File "C:\Users\bach_ar\.conda\envs\311\Lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 112446: character maps to <undefined>
┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐
│ C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\adopt_ruff\main.py:322 in _main               │
│                                                                                                  │
│   319 │   logger.debug(f"{include_sometimes_fixable=}")                                          │
│   320 │   logger.debug(f"{repo_name=}")                                                          │
│   321 │                                                                                          │
│ > 322 │   rules, violations, ruff_version = run_ruff(code_path)                                  │
│   323 │   config: RuffConfig = RuffConfig.from_file(                                             │
│   324 │   │   path=ruff_conf_path or search_config_file(code_path),                              │
│   325 │   │   rules=rules,                                                                       │
│                                                                                                  │
│ ┌───────────────────────── locals ──────────────────────────┐                                    │
│ │                 code_path = WindowsPath('autocook')       │                                    │
│ │           include_preview = True                          │                                    │
│ │ include_sometimes_fixable = False                         │                                    │
│ │                 repo_name = None                          │                                    │
│ │            ruff_conf_path = WindowsPath('pyproject.toml') │                                    │
│ └───────────────────────────────────────────────────────────┘                                    │
│                                                                                                  │
│ C:\Users\bach_ar\.conda\envs\311\Lib\site-packages\adopt_ruff\main.py:40 in run_ruff             │
│                                                                                                  │
│    37 │   # Now when ruff is found, assume the following commands will run properly              │
│    38 │   rules = {                                                                              │
│    39 │   │   Rule(**value)                                                                      │
│ >  40 │   │   for value in json.loads(                                                           │
│    41 │   │   │   subprocess.run(                                                                │
│    42 │   │   │   │   ["ruff", "rule", "--all", "--output-format=json"],                         │
│    43 │   │   │   │   check=True,                                                                │
│                                                                                                  │
│ ┌──────────────── locals ────────────────┐                                                       │
│ │         path = WindowsPath('autocook') │                                                       │
│ │ ruff_version = <Version('0.1.14')>     │                                                       │
│ └────────────────────────────────────────┘                                                       │
│                                                                                                  │
│ C:\Users\bach_ar\.conda\envs\311\Lib\json\__init__.py:339 in loads                               │
│                                                                                                  │
│   336 │   │   │   │   │   │   │   │     s, 0)                                                    │
│   337 │   else:                                                                                  │
│   338 │   │   if not isinstance(s, (bytes, bytearray)):                                          │
│ > 339 │   │   │   raise TypeError(f'the JSON object must be str, bytes or bytearray, '           │
│   340 │   │   │   │   │   │   │   f'not {s.__class__.__name__}')                                 │
│   341 │   │   s = s.decode(detect_encoding(s), 'surrogatepass')                                  │
│   342                                                                                            │
│                                                                                                  │
│ ┌───────── locals ─────────┐                                                                     │
│ │               cls = None │                                                                     │
│ │                kw = {}   │                                                                     │
│ │       object_hook = None │                                                                     │
│ │ object_pairs_hook = None │                                                                     │
│ │    parse_constant = None │                                                                     │
│ │       parse_float = None │                                                                     │
│ │         parse_int = None │                                                                     │
│ │                 s = None │                                                                     │
│ └──────────────────────────┘                                                                     │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
TypeError: the JSON object must be str, bytes or bytearray, not NoneType

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.