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

various cython-lint suggestions #156

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cypari2/closure.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Examples:
[0, 1, 8, 27, 64, 125, 216, 343, 512, 729]
"""

#*****************************************************************************
# ****************************************************************************
# Copyright (C) 2015 Jeroen Demeyer <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/
#*****************************************************************************
# https://www.gnu.org/licenses/
# ****************************************************************************

from __future__ import absolute_import, division, print_function

Expand Down Expand Up @@ -99,7 +99,8 @@ cdef extern from *:
GEN call_python_func(GEN* args, PyObject* py_func)


cdef GEN call_python(GEN arg1, GEN arg2, GEN arg3, GEN arg4, GEN arg5, ulong nargs, ulong py_func):
cdef GEN call_python(GEN arg1, GEN arg2, GEN arg3, GEN arg4, GEN arg5,
ulong nargs, ulong py_func):
"""
This function, which will be installed in PARI, is a front-end for
``call_python_func_impl``.
Expand Down
6 changes: 3 additions & 3 deletions cypari2/gen.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ AUTHORS:
conversion
"""

#*****************************************************************************
# ****************************************************************************
# Copyright (C) 2006,2010 William Stein <[email protected]>
# Copyright (C) ???? Justin Walker
# Copyright (C) ???? Gonzalo Tornaria
Expand All @@ -52,8 +52,8 @@ AUTHORS:
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# http://www.gnu.org/licenses/
#*****************************************************************************
# https://www.gnu.org/licenses/
# ****************************************************************************

from __future__ import absolute_import, division, print_function

Expand Down
4 changes: 2 additions & 2 deletions cypari2/handle_error.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AUTHORS:

"""

#*****************************************************************************
# ****************************************************************************
# Copyright (C) 2013 Peter Bruin
# Copyright (C) 2015 Jeroen Demeyer
#
Expand All @@ -19,7 +19,7 @@ AUTHORS:
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# https://www.gnu.org/licenses/
#*****************************************************************************
# ****************************************************************************

from __future__ import absolute_import, division, print_function

Expand Down
8 changes: 4 additions & 4 deletions cypari2/pari_instance.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ Test that changing the stack size using ``default`` works properly:
536870912
"""

#*****************************************************************************
# ****************************************************************************
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/
#*****************************************************************************
# https://www.gnu.org/licenses/
# ****************************************************************************

from __future__ import absolute_import, division

Expand Down Expand Up @@ -1318,7 +1318,7 @@ cdef class Pari(Pari_auto):

If the second argument `p` is specified, it must be a prime.
Then only the local information at `p` is computed and returned.

Examples:

>>> import cypari2
Expand Down
2 changes: 1 addition & 1 deletion cypari2/paridecl.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -3524,7 +3524,7 @@ cdef extern from *: # PARI headers already included by types.pxd
void shiftaddress_canon(GEN x, long dec)
long timer()
long timer2()
void traverseheap( void(*f)(GEN, void *), void *data )
void traverseheap(void(*f)(GEN, void *), void *data)

# intnum.c

Expand Down
6 changes: 3 additions & 3 deletions cypari2/stack.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Memory management for Gens on the PARI stack or the heap
********************************************************
"""

#*****************************************************************************
# ****************************************************************************
# Copyright (C) 2016 Luca De Feo <[email protected]>
# Copyright (C) 2018 Jeroen Demeyer <[email protected]>
#
Expand All @@ -12,12 +12,12 @@ Memory management for Gens on the PARI stack or the heap
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/
#*****************************************************************************
# ****************************************************************************

from __future__ import absolute_import, division, print_function
cimport cython

from cpython.ref cimport PyObject, Py_XINCREF, Py_XDECREF
from cpython.ref cimport PyObject
from cpython.exc cimport PyErr_SetString

from cysignals.signals cimport (sig_on, sig_off, sig_block, sig_unblock,
Expand Down
6 changes: 3 additions & 3 deletions cypari2/types.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ linking to PARI. This file should consist only of typedefs and macros
from PARI's include files.
"""

#*****************************************************************************
# ****************************************************************************
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# http://www.gnu.org/licenses/
#*****************************************************************************
# https://www.gnu.org/licenses/
# ****************************************************************************

cdef extern from "pari/pari.h":
ctypedef unsigned long ulong "pari_ulong"
Expand Down
Loading