← 输入框|github.com|刷新
Skip to content

style suggestion in integration tests #2478

Closed

Description

@rebcabin
[ 50%] Linking C executable test_builtin
[ 51%] Linking C executable test_builtin_abs
[ 51%] Linking C executable elemental_13
[ 51%] Built target test_os
[ 51%] Built target elemental_12
style suggestion: Could have used '**' instead of 'pow'
  --> /Users/brian/Dropbox/Mac/Documents/GitHub/lpython/integration_tests/test_builtin_pow.py:11:16
   |
11 |     assert i32(pow(a, b)) == 32
   |                ^^^^^^^^^ '**' could be used instead


Note: Please report unclear or confusing messages as bugs at
https://github.com/lcompilers/lpython/issues.
[ 52%] Generating test_builtin_len.o
[ 52%] Generating test_builtin_str.o
[ 52%] Built target test_builtin

Activity

  1. certik commented on Feb 5, 2024

    @certik
    Contributor

    Yes. We are testing that pow(a, b) works here. We could disable the style suggestions for this particular test.

  2. added
    enhancement
    good first issue
    on Feb 7, 2024
  3. rebcabin commented on Feb 7, 2024

    @rebcabin
    ContributorAuthor

    Seems like a good first issue for someone wanting to learn the test machinery.

  4. certik commented on Feb 11, 2024

    @certik
    Contributor

    The idea from #2518 to use # noqa seems like a good idea, since there is prior art in Python to use this to silence warnings. We have to enhance the parser and then in AST->ASR use this information from AST to not give the warning. I think ASR doesn't need to know about this at all.

  5. advikkabra commented on Feb 11, 2024

    @advikkabra
    Collaborator

    Sorry, I missed this comment before opening a PR. It can work as a temporary fix till the # noqa is implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions