John Vandenberg

Results 1280 issues of John Vandenberg

`test_vlang_recursive` should be able to parse the source code of pyv and py2many

V

Python: ```py def dict_get(): CODES = {"KEY": 1} assert CODES.get("KEY") == 1 def dict_get_default(): CODES = {"KEY": 1} assert CODES.get("MISSING", 2) == 2 ``` Kotlin works with the former only,...

Julia
Kotlin

Case identified at https://github.com/adsharma/py2many/pull/363#discussion_r663622435 , but the failures are unrelated to that PR C++ fails with ``` /Users/john.vandenberg/python/py2many/tests/build/coverage.cpp:41:12: error: 'b3' was not declared in this scope; did you mean 'b2'?...

C++
Dart

```py def arg_binop(x: 1+2): return x ``` Valid Python, if a bit strange in this simplistic example. ``` ❯ python -c 'import ast; print(ast.dump(ast.parse("def arg_binop(x: 1+2): return x")))' Module(body=[FunctionDef(name='arg_binop', args=arguments(posonlyargs=[],...

Julia
Kotlin
C++
Rust
Go
Nim

`[a, b](bool)` is a fairly common trick employed in Python, leveraging of the fact that `False == 0` and `True == 1` ```py assert ["false", "true"][True] == "true" assert ["false",...

Kotlin
Go
Nim

I have a function which does a lookup on a mapping of a global int -> str, returning the string. https://github.com/swift-nav/piksi_tools/blob/55d5d4e/piksi_tools/console/utils.py#L510-L513 With https://github.com/adsharma/py2many/pull/249, the dict aspect is working (almost: `rustup...

Rust

https://github.com/adsharma/py2many/pull/261 causes new clippy warnings ```rust warning: constants have by default a `'static` lifetime --> piksi_tools_constants.rs:291:26 | 291 | pub const QZS_L1CA_STR: &'static str = "QZS L1CA"; | -^^^^^^^---- help:...

Rust

https://pub.dev/packages/lint and https://pub.dev/packages/linter depends on `dart analyze` which only works on an entire project. https://github.com/dart-lang/dart_style runs standalone on files provided on the CLI. And it identifies these fixes ``` diff...

Dart

```py for color in Colors: print(color) ``` becomes ```rust for color in Colors { println!("{:?} ",color); } ``` with error ```rust error[E0423]: expected value, found enum `Colors` --> int_enum.rs:23:14 |...

Rust

`int(True)` should give `1` and `int(False)` should give 0. This isnt supported by the bool datatypes for Dart, Go and Kotlin. `float(True)` is also valid in Python, but `float(1)` has...

Kotlin
Go
Dart