Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into default_prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aucampia committed Apr 15, 2022
2 parents 2f9cccf + f014e98 commit 11f2357
Show file tree
Hide file tree
Showing 220 changed files with 1,130 additions and 860 deletions.
2 changes: 1 addition & 1 deletion admin/get_merged_prs.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Get all merged PRs since last release, save them to a JSON file"""

import httpx
import json
from datetime import datetime

import httpx

r = httpx.get(
"https://api.github.com/repos/rdflib/rdflib/pulls",
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import re
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
13 changes: 4 additions & 9 deletions rdflib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"util",
]

import sys
import logging
import sys

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -157,13 +157,8 @@
Literal work, eq, __neq__, __lt__, etc.
"""

from rdflib.term import URIRef, BNode, IdentifiedNode, Literal, Variable

from rdflib.graph import Dataset, Graph, ConjunctiveGraph

from rdflib import plugin
from rdflib import query

from rdflib import plugin, query
from rdflib.graph import ConjunctiveGraph, Dataset, Graph
from rdflib.namespace import (
BRICK,
CSVW,
Expand Down Expand Up @@ -193,11 +188,11 @@
XSD,
Namespace,
)
from rdflib.term import BNode, IdentifiedNode, Literal, URIRef, Variable

# tedious sop to flake8
assert plugin
assert query

from rdflib import util

from rdflib.container import *
4 changes: 1 addition & 3 deletions rdflib/collection.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from rdflib.namespace import RDF
from rdflib.term import BNode
from rdflib.term import Literal

from rdflib.term import BNode, Literal

__all__ = ["Collection"]

Expand Down
27 changes: 12 additions & 15 deletions rdflib/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@
_:cb558f30e21ddfc05ca53108348338ade8
<http://example.org/ns#label> "B" .
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from __future__ import absolute_import, division, print_function

# TODO:
# - Doesn't handle quads.
Expand All @@ -92,24 +89,24 @@
"similar",
]

from rdflib.graph import Graph, ConjunctiveGraph, ReadOnlyGraphAggregate
from rdflib.term import BNode, Node, URIRef, IdentifiedNode
from hashlib import sha256

from datetime import datetime
from collections import defaultdict
from datetime import datetime
from hashlib import sha256
from typing import (
Set,
Dict,
TYPE_CHECKING,
Union,
List,
Tuple,
Callable,
Optional,
Dict,
Iterator,
List,
Optional,
Set,
Tuple,
Union,
)

from rdflib.graph import ConjunctiveGraph, Graph, ReadOnlyGraphAggregate
from rdflib.term import BNode, IdentifiedNode, Node, URIRef

if TYPE_CHECKING:
from _hashlib import HASH

Expand Down
3 changes: 1 addition & 2 deletions rdflib/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
and different versions of support libraries.
"""

import re
import codecs
import re
import warnings
from typing import TYPE_CHECKING, Match


if TYPE_CHECKING:
import xml.etree.ElementTree as etree
else:
Expand Down
3 changes: 2 additions & 1 deletion rdflib/container.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from random import randint

from rdflib.namespace import RDF
from rdflib.term import BNode, URIRef
from random import randint

__all__ = ["Container", "Bag", "Seq", "Alt", "NoElementException"]

Expand Down
6 changes: 3 additions & 3 deletions rdflib/extras/cmdlineutils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import codecs
import getopt
import sys
import time
import getopt
import rdflib
import codecs

import rdflib
from rdflib.util import guess_format


Expand Down
46 changes: 22 additions & 24 deletions rdflib/graph.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
import logging
import os
import pathlib
import random
import shutil
import tempfile
from io import BytesIO
from typing import (
IO,
Any,
BinaryIO,
Generator,
Iterable,
Optional,
TextIO,
Union,
Tuple,
Type,
Union,
cast,
overload,
Generator,
Tuple,
)
import logging
from urllib.parse import urlparse
from urllib.request import url2pathname
from warnings import warn
import random
from rdflib.namespace import Namespace, RDF
from rdflib import plugin, exceptions, query, namespace

import rdflib.term
from rdflib.term import BNode, IdentifiedNode, Node, URIRef, Literal, Genid
from rdflib.paths import Path
from rdflib.store import Store
from rdflib.serializer import Serializer
from rdflib.parser import InputSource, Parser, create_input_source
from rdflib.namespace import NamespaceManager
from rdflib.resource import Resource
from rdflib.collection import Collection
import rdflib.util # avoid circular dependency
from rdflib import exceptions, namespace, plugin, query
from rdflib.collection import Collection
from rdflib.exceptions import ParserError

import os
import shutil
import tempfile
import pathlib

from io import BytesIO
from urllib.parse import urlparse
from urllib.request import url2pathname
from rdflib.namespace import RDF, Namespace, NamespaceManager
from rdflib.parser import InputSource, Parser, create_input_source
from rdflib.paths import Path
from rdflib.resource import Resource
from rdflib.serializer import Serializer
from rdflib.store import Store
from rdflib.term import BNode, Genid, IdentifiedNode, Literal, Node, URIRef

assert Literal # avoid warning
assert Namespace # avoid warning
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_BRICK.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class BRICK(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_CSVW.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class CSVW(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_DC.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class DC(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_DCAM.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class DCAM(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_DCAT.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class DCAT(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_DCMITYPE.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class DCMITYPE(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_DCTERMS.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class DCTERMS(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_DOAP.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class DOAP(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_FOAF.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class FOAF(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_GEO.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class GEO(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_ODRL2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class ODRL2(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_ORG.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class ORG(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_OWL.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class OWL(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_PROF.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class PROF(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_PROV.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class PROV(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_QB.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class QB(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_RDF.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class RDF(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_RDFS.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class RDFS(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_SDO.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class SDO(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_SH.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class SH(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_SKOS.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class SKOS(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_SOSA.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class SOSA(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_SSN.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class SSN(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_TIME.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class TIME(DefinedNamespace):
Expand Down
2 changes: 1 addition & 1 deletion rdflib/namespace/_VANN.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from rdflib.term import URIRef
from rdflib.namespace import DefinedNamespace, Namespace
from rdflib.term import URIRef


class VANN(DefinedNamespace):
Expand Down

0 comments on commit 11f2357

Please sign in to comment.