Skip to content

Commit

Permalink
Make optional parameters mandatory keywords.
Browse files Browse the repository at this point in the history
  • Loading branch information
lmichel committed Dec 15, 2024
1 parent b8021e9 commit 0303a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions pyvo/mivot/writer/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def _get_templates(self):
templates_block += "</TEMPLATES>\n"
return templates_block

def build_mivot_block(self, templates_id=None):
def build_mivot_block(self, *, templates_id=None):
"""
Builds a complete MIVOT block from the declared components and validates it
against the MIVOT XML schema.
Expand Down Expand Up @@ -296,16 +296,14 @@ def check_xml(self):
except Exception as excep:
raise MappingError(f"Validation failed: {excep}") from excep

def insert_into_votable(self, votable_file, template_id=None, override=False):
def insert_into_votable(self, votable_file, override=False):
"""
Inserts the MIVOT block into a VOTable.
Parameters
----------
votable_file : str or VOTableFile
The VOTable to be annotated, either as a file path or a ``VOTableFile`` instance.
template_id : str, optional
The ID of the TABLE to be mapped. Defaults to None.
override : bool
If True, overrides any existing annotations in the VOTable.
Expand Down
2 changes: 1 addition & 1 deletion pyvo/mivot/writer/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, dmtype=None, *, dmrole=None, dmid=None):
self._dmid = dmid
self._content = []

def add_attribute(self, dmtype=None, dmrole=None, ref=None, value=None, unit=None):
def add_attribute(self, dmtype=None, dmrole=None, *, ref=None, value=None, unit=None):
"""
Add an <ATTRIBUTE> element to the instance.
Expand Down

0 comments on commit 0303a85

Please sign in to comment.