mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
dos2unix
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import itertools
|
||||
|
||||
class ArgumentsChecker:
|
||||
def __init__( self, mandatoryParameters, optionalParameters ):
|
||||
self.__mandatoryParameters = mandatoryParameters
|
||||
self.__optionalParameters = optionalParameters
|
||||
|
||||
def check( self, args, kwds ):
|
||||
data = dict( kwds )
|
||||
for arg, argumentName in itertools.izip( args, itertools.chain( self.__mandatoryParameters, self.__optionalParameters ) ):
|
||||
if argumentName in kwds:
|
||||
raise TypeError()
|
||||
else:
|
||||
data[ argumentName ] = arg
|
||||
for argumentName in data:
|
||||
if argumentName not in itertools.chain( self.__mandatoryParameters, self.__optionalParameters ):
|
||||
raise TypeError()
|
||||
for argumentName in self.__mandatoryParameters:
|
||||
if argumentName not in data:
|
||||
raise TypeError()
|
||||
return data
|
||||
import itertools
|
||||
|
||||
class ArgumentsChecker:
|
||||
def __init__( self, mandatoryParameters, optionalParameters ):
|
||||
self.__mandatoryParameters = mandatoryParameters
|
||||
self.__optionalParameters = optionalParameters
|
||||
|
||||
def check( self, args, kwds ):
|
||||
data = dict( kwds )
|
||||
for arg, argumentName in itertools.izip( args, itertools.chain( self.__mandatoryParameters, self.__optionalParameters ) ):
|
||||
if argumentName in kwds:
|
||||
raise TypeError()
|
||||
else:
|
||||
data[ argumentName ] = arg
|
||||
for argumentName in data:
|
||||
if argumentName not in itertools.chain( self.__mandatoryParameters, self.__optionalParameters ):
|
||||
raise TypeError()
|
||||
for argumentName in self.__mandatoryParameters:
|
||||
if argumentName not in data:
|
||||
raise TypeError()
|
||||
return data
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from distutils.core import setup
|
||||
import textwrap
|
||||
|
||||
setup(
|
||||
name = 'PyGithub',
|
||||
version = '0.2',
|
||||
description = 'Use the full Github API v3',
|
||||
author = 'Vincent Jacques',
|
||||
author_email = 'vincent@vincent-jacques.net',
|
||||
url = 'http://vincent-jacques.net/PyGithub',
|
||||
long_description = textwrap.dedent( """\
|
||||
Tutorial
|
||||
========
|
||||
|
||||
First create a Gihub instance::
|
||||
|
||||
from github import Github
|
||||
|
||||
g = Github( "user", "password" )
|
||||
|
||||
Then play with your Github objects::
|
||||
|
||||
for repo in g.user().get_repos():
|
||||
print repo.name
|
||||
repo.edit( has_wiki = False )
|
||||
|
||||
Reference documentation
|
||||
=======================
|
||||
|
||||
See http://vincent-jacques.net/PyGithub""" ),
|
||||
packages = [
|
||||
'github',
|
||||
'github.ObjectCapacities',
|
||||
],
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Web Environment",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Topic :: Software Development",
|
||||
],
|
||||
)
|
||||
#!/usr/bin/env python
|
||||
|
||||
from distutils.core import setup
|
||||
import textwrap
|
||||
|
||||
setup(
|
||||
name = 'PyGithub',
|
||||
version = '0.2',
|
||||
description = 'Use the full Github API v3',
|
||||
author = 'Vincent Jacques',
|
||||
author_email = 'vincent@vincent-jacques.net',
|
||||
url = 'http://vincent-jacques.net/PyGithub',
|
||||
long_description = textwrap.dedent( """\
|
||||
Tutorial
|
||||
========
|
||||
|
||||
First create a Gihub instance::
|
||||
|
||||
from github import Github
|
||||
|
||||
g = Github( "user", "password" )
|
||||
|
||||
Then play with your Github objects::
|
||||
|
||||
for repo in g.user().get_repos():
|
||||
print repo.name
|
||||
repo.edit( has_wiki = False )
|
||||
|
||||
Reference documentation
|
||||
=======================
|
||||
|
||||
See http://vincent-jacques.net/PyGithub""" ),
|
||||
packages = [
|
||||
'github',
|
||||
'github.ObjectCapacities',
|
||||
],
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Web Environment",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Topic :: Software Development",
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user