Skip to content

Tags: codeclimate/codeclimate-duplication

Tags

b1258

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump cc-parser to b850 (#357)

Co-authored-by: Shipbot <shipbot@codeclimate.com>

b1254

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump cc-parser to b843 (#354)

Co-authored-by: Shipbot <shipbot@codeclimate.com>

b1243

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump cc-parser to b835 (#351)

b1239

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Bump cc-parser to b829

b1235

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump cc-parser to b823 (#349)

b1231

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump cc-parser to b804 (#348)

b1227

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Bump cc-parser to b800 (#347)

b1223

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Python3: don't crash on bytes literal

What happens is that we try to cast this business from the AST to JSON,
which does not work. In python 2, it's just treated like a regular
string. But in python 3, we recognize that it is a bytes literal.

This implemention casts the bytes literal to a string, which is a type
that is serialiable to JSON:

```
>>> (b'hello').decode()
'hello'
```

This will default to utf8, and generally works, although it's possible
sometimes it will not work if the source file is encoded differently.

https://docs.python.org/3/library/stdtypes.html#bytes.decode

An alternative is to cast it to an array of integers, which would also
work for structural-comparison purposes:

```
>>> list(b'hello')
[104, 101, 108, 108, 111]
```

b1219

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Bump cc-parser to b795

b1214

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Bump cc-parser to b784