Projet

Général

Profil

Development #32866

nettoyage PEP8, codestyle, python3

Ajouté par Benjamin Dauvergne il y a presque 5 ans. Mis à jour il y a presque 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
07 mai 2019
Echéance:
% réalisé:

0%

Temps estimé:
Hors marché:
Non
Patch proposed:
Oui
Planning:
Non

Description

Pré-nettoyage avant intégration future dans authentic.


Fichiers


Demandes liées

Bloqué par Authentic 2 - Development #32934: grand ménage de printempsFermé09 mai 2019

Actions

Révisions associées

Révision e0445982 (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

add copyright headers (#32866)

Révision 00772186 (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

improve code style (#32866)

- remove obviously dead code (reported by flake8)
- fix PEP8 violations
- rename variable using stdlib builtin names
- use get_version() from combo's setup.py

Révision 2746d095 (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

py3ize obviously non-compatible code (#32866)

Révision beca608c (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

adapts to spring cleaning in authentic (#32866)

See #32934.

Révision 72d48a83 (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

add copyright headers (#32866)

Révision 8d27718f (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

improve code style (#32866)

- remove obviously dead code (reported by flake8)
- fix PEP8 violations
- rename variable using stdlib builtin names
- use get_version() from combo's setup.py

Révision 338b02cd (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

py3ize obviously non-compatible code (#32866)

Révision 1c40ec3f (diff)
Ajouté par Benjamin Dauvergne il y a presque 5 ans

adapts to spring cleaning in authentic (#32866)

See #32934.

Historique

#1

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

C'est le printemps, on nettoye.

#2

Mis à jour par Emmanuel Cazenave il y a presque 5 ans

Histoire de chipoter ou d'apprendre quelque chose, pourquoi :

# duck-type unicode/Py3 strings
if hasattr(key, 'isdecimal'):
    key = key.encode('utf-8')

plutôt que

# duck-type unicode/Py3 strings
if hasattr(key, 'encode'):
    key = key.encode('utf-8')
?
#3

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

Emmanuel Cazenave a écrit :

Histoire de chipoter ou d'apprendre quelque chose, pourquoi :

[...]

plutôt que

[...]

?

Parce que

Python 2.7.15+ (default, Feb  3 2019, 13:13:16) 
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> 'encode' in (set(dir(str)) & set(dir(unicode)))
True
>>> set(dir(unicode)) - set(dir(str))
set(['isnumeric', 'isdecimal'])

#5

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

#6

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

  • Statut changé de Solution proposée à Résolu (à déployer)
commit beca608c97c0ac15d5a96d8d5a363bbb114d74f0
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Thu May 9 19:19:18 2019 +0200

    adapts to spring cleaning in authentic (#32866)

    See #32934.

commit 2746d095c5f7eb08d7ef587937b870756e59f0d0
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue May 7 14:31:07 2019 +0200

    py3ize obviously non-compatible code (#32866)

commit 007721868528d61cad165753a409f0996ebae831
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue May 7 14:07:59 2019 +0200

    improve code style (#32866)

    - remove obviously dead code (reported by flake8)
    - fix PEP8 violations
    - rename variable using stdlib builtin names
    - use get_version() from combo's setup.py

commit e04459825c1f317cd71afd82ba2640cbcc7576dc
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue May 7 14:05:39 2019 +0200

    add copyright headers (#32866)
#7

Mis à jour par Benjamin Dauvergne il y a presque 5 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF