Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support variable declarations in c #1847

Draft
wants to merge 92 commits into
base: devel
Choose a base branch
from

Conversation

mustapha-belbiad
Copy link
Contributor

No description provided.

@pyccel-bot
Copy link

pyccel-bot bot commented Apr 22, 2024

Hello again! Thank you for this new pull request 🤩.

Please begin by requesting your checklist using the command /bot checklist

@github-actions github-actions bot marked this pull request as draft April 22, 2024 13:17
@Farouk-Echaref
Copy link
Contributor

Farouk-Echaref commented May 24, 2024

Here is your checklist. Please tick items off when you have completed them or determined that they are not necessary for this pull request:

  • Write a clear PR description
  • Add tests to check your code works as expected
  • Update documentation if necessary
  • Update Changelog
  • Ensure any relevant issues are linked
  • Ensure new tests are passing
  • Update AUTHORS file

@Farouk-Echaref
Copy link
Contributor

/bot run pr_tests

)
def test_homogeneous_set_annotation_int(language):
def homogeneous_set_annotation ():
a : set[int] #pylint: disable=unused-variable
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only valid in Python > 3.8.
3.8 only reaches end of life in November so we still support it. You can use:

Suggested change
a : set[int] #pylint: disable=unused-variable
a : 'set[int]' #pylint: disable=unused-variable

to get round this

@Farouk-Echaref
Copy link
Contributor

/bot show tests

@pyccel-bot
Copy link

pyccel-bot bot commented May 24, 2024

The following is a list of keywords which can be used to run tests. Tests in bold are run by pull requests when they are marked as ready for review:

  • linux : Runs the unit tests on a Linux system.
  • windows : Runs the unit tests on a Windows system.
  • macosx : Runs the unit tests on a MacOS X system.
  • coverage : Runs the unit tests on a Linux system and checks the coverage of the tests.
  • docs : Checks if the documentation follows the numpydoc format.
  • pylint : Runs pylint on files which are too big to be handled by codacy.
  • pyccel_lint : Runs a linter to check that Pyccel's best practices are followed.
  • spelling : Checks if everything in the documentation is spelled (and capitalised) correctly.
  • pr_tests : Runs all the tests marked in bold.
  • pickle : Checks that .pyccel files have been correctly generated and installed by the installation process.
  • editable_pickle : Checks that .pyccel files have been correctly generated and installed by the editable installation process.
  • pickle_wheel : Checks that .pyccel files have been correctly generated and packaged into the wheel.
  • anaconda_linux : Runs the unit tests on a linux system using anaconda for python.
  • anaconda_windows : Runs the unit tests on a windows system using anaconda for python.
  • intel : Runs the unit tests on a linux system using the intel compiler.

These tests can be run with the command /bot run X (multiple tests can be specified separated by spaces), or with try V X to test on Python version V.

@Farouk-Echaref
Copy link
Contributor

/bot run docs pylint pyccel_lint spelling

@Farouk-Echaref
Copy link
Contributor

/bot run docs pylint pyccel_lint spelling

@Farouk-Echaref
Copy link
Contributor

/bot run linux

@EmilyBourne
Copy link
Member

@Farouk-Echaref 64249ca looks like a rather opaque solution to this problem and one that could cause problems in some situations. E.g:

class A:
    def A__method():
        pass

The only reason the renaming is done in ModuleHeader is because _print_ModuleHeader is called before _print_Module. If you change the order then you could simply change where the renaming is done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Containers tuples/lists/sets/maps Feature adding new features Lists Variable-length homogeneous lists
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SETS] Support variable declarations in C [LISTS] Support variable declarations in C
3 participants