[pybliographer] style: pyflakes
- From: Germán Poo-Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pybliographer] style: pyflakes
- Date: Wed, 28 Mar 2018 23:07:22 +0000 (UTC)
commit 9ea33470a297052dbe73a1c765747280c50696a3
Author: Germán Poo-Caamaño <gpoo gnome org>
Date: Wed Mar 28 12:02:38 2018 -0300
style: pyflakes
Pyblio/Style/Generic.py | 21 ++++++++++-----------
Pyblio/Style/Parser.py | 22 +++++++++++-----------
Pyblio/Style/Utils.py | 22 +++++++++++-----------
Pyblio/Style/abbrv.py | 25 +++++++++++--------------
Pyblio/Style/apa4e.py | 26 ++++++++++++--------------
5 files changed, 55 insertions(+), 61 deletions(-)
---
diff --git a/Pyblio/Style/Generic.py b/Pyblio/Style/Generic.py
index 445c1ef..4d0ea62 100644
--- a/Pyblio/Style/Generic.py
+++ b/Pyblio/Style/Generic.py
@@ -1,29 +1,28 @@
+# -*- coding: utf-8 -*-
# This file is part of pybliographer
-#
-# Copyright (C) 1998-2004 Frederic GOBRY
-# Email : gobry pybliographer org
-#
+#
+# Copyright (C) 2018 Germán Poo-Caamaño <gpoo gnome org>
+# Copyright (C) 1998-2004 Frederic GOBRY <gobry pybliographer org>
+#
# 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
+# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# GNU General Public License for more details.
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
+#
''' Generic XML bibliographic style handler '''
import string
-from Pyblio.Style import Parser
from Pyblio import Autoload, recode
diff --git a/Pyblio/Style/Parser.py b/Pyblio/Style/Parser.py
index 90e4f30..5284b1d 100644
--- a/Pyblio/Style/Parser.py
+++ b/Pyblio/Style/Parser.py
@@ -1,33 +1,32 @@
# -*- coding: utf-8 -*-
# This file is part of pybliographer
-#
+#
# Copyright (C) 2018 Germán Poo-Caamaño <gpoo gnome org>
# Copyright (C) 1998-2004 Frederic GOBRY <gobry pybliographer org>
-#
+#
# 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
+# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# GNU General Public License for more details.
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
+#
''' Parser for XML definitions of the bibliographic output '''
-from Pyblio import Open, Autoload
+import string
+import re
from xml import sax
-from xml.sax.saxutils import escape, quoteattr
-import string, re
+from Pyblio import Open, Autoload
_map = string.maketrans ('\t', ' ')
_cpt = re.compile ('\s+')
@@ -36,6 +35,7 @@ _dnl = re.compile ('\n')
_lines = re.compile ('\d+-+\d+')
+
class BibStyle:
def __init__ (self):
self.data = []
diff --git a/Pyblio/Style/Utils.py b/Pyblio/Style/Utils.py
index ef59b42..fa6f0e9 100644
--- a/Pyblio/Style/Utils.py
+++ b/Pyblio/Style/Utils.py
@@ -1,26 +1,26 @@
+# -*- coding: utf-8 -*-
# This file is part of pybliographer
-#
-# Copyright (C) 1998-2004 Frederic GOBRY
-# Email : gobry pybliographer org
-#
+#
+# Copyright (C) 2018 Germán Poo-Caamaño <gpoo gnome org>
+# Copyright (C) 1998-2004 Frederic GOBRY <gobry pybliographer org>
+#
# 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
+# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# GNU General Public License for more details.
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
+#
from Pyblio.Style import Parser
-from Pyblio import Fields, Autoload
+
def generate (style_url, format, database, keys, output):
diff --git a/Pyblio/Style/abbrv.py b/Pyblio/Style/abbrv.py
index fecc055..a2aa71b 100644
--- a/Pyblio/Style/abbrv.py
+++ b/Pyblio/Style/abbrv.py
@@ -1,25 +1,23 @@
-# -*- coding: UTF-8 -*-
+# -*- coding: utf-8 -*-
# This file is part of pybliographer
-#
-# Copyright (C) 1998-2004 Frederic GOBRY
-# Email : gobry pybliographer org
-#
+#
+# Copyright (C) 2018 Germán Poo-Caamaño <gpoo gnome org>
+# Copyright (C) 1998-2004 Frederic GOBRY <gobry pybliographer org>
+#
# 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
+# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# GNU General Public License for more details.
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-#
-
+#
# This module is based on Generic.py. It can be used for generating string,
# bibdb, author-year, and unsorted numeric keys. See also pybtext.py and
# abbrv*.xml styles.
@@ -29,11 +27,10 @@
import string
-from Pyblio.Style import Parser
from Pyblio import Autoload, recode
-
from Pyblio import pybtextvar
+
def author_desc (group, coding, initials = 0, reverse = 0):
""" Create a nice string describing a group of authors.
diff --git a/Pyblio/Style/apa4e.py b/Pyblio/Style/apa4e.py
index 4cf54a0..4b20b27 100644
--- a/Pyblio/Style/apa4e.py
+++ b/Pyblio/Style/apa4e.py
@@ -1,32 +1,30 @@
+# -*- coding: utf-8 -*-
# This file is part of pybliographer
-#
-# Copyright (C) 1998-2004 Frederic GOBRY
-# Email : gobry pybliographer org
-#
+#
+# Copyright (C) 2018 Germán Poo-Caamaño <gpoo gnome org>
+# Copyright (C) 1998-2004 Frederic GOBRY <gobry pybliographer org>
+#
# 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
+# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
+# GNU General Public License for more details.
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
+#
# apa4e.py based on:
-#
-
-# Virtually same as Generic.py with small changes
-# Darrell Rudmann, rudmann uiuc edu
+# Virtually same as Generic.py with small changes
+# Darrell Rudmann, rudmann uiuc edu
''' APA 4ed XML bibliographic style handler '''
import string
-from Pyblio.Style import Parser
from Pyblio import Autoload, recode
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]